package view.mt4j.component;

import model.StatechartComponent;
import model.util.Point;

import org.mt4j.MTApplication;
import org.mt4j.components.MTComponent;

import controller.view.StatechartController;

import view.interfaces.component.ComponentView;

public abstract class AbstractComponentView extends MTComponent implements
		ComponentView {

	protected final StatechartComponent statechartComponent;
	protected final MTApplication application;
	protected StatechartController statechartController;
	
	public AbstractComponentView(final MTApplication application,
			final StatechartComponent statechartComponent) {
		super(application, statechartComponent.getClass().getSimpleName() + " "
				+ statechartComponent.getId());
		this.application = application;
		this.statechartComponent = statechartComponent;
	}

	@Override
	public Point getLocation() {
		return statechartComponent.getLocation();
	}

	@Override
	public void setLocation(Point point) {
		statechartComponent.setLocation(point);
	}
	
	public final void setStatechartController(
			StatechartController statechartController) {
		this.statechartController = statechartController;
	}
}
